﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.DialogUI {
    import flash.events.*;
    import Engine.Managers.*;
    import flash.display.*;
    import flash.utils.*;

    public class DailyDripDialog extends GenericDialog {

        protected var m_numAssetLoads:int = 0;
        protected var m_imagesLoaded:int = 0;
        protected var m_dripAssetObject:Object;
        protected var m_loader:Loader;

        public function DailyDripDialog(){
            var _local1:Function;
            var _local2:Boolean;
            var _local3:Function;
            var _local4 = "DailyDrip";
            var _local5:String = ZLoc.t("Dialogs", "DailyDripMessage");
            super(_local5, "", GenericDialogView.TYPE_OK, _local1, _local4, "", _local2, 0, "", _local3);
        }
        override protected function loadAssets():void{
            this.m_numAssetLoads = 1;
            var _local1:String = Global.getAssetURL("assets/dialogs/DailyDripAssets.swf");
            this.m_loader = LoadingManager.load(_local1, this.makeDripAssets, LoadingManager.PRIORITY_HIGH);
        }
        protected function makeDripAssets(_arg1:Event):void{
            var _local2:Loader = (_arg1.target.loader as Loader);
            m_comObject = _local2.content;
            this.onAssetsLoaded(_arg1);
        }
        override protected function onAssetsLoaded(_arg1:Event=null):void{
            this.m_imagesLoaded++;
            if (this.m_imagesLoaded < this.m_numAssetLoads){
                return;
            };
            super.onAssetsLoaded(_arg1);
        }
        override protected function createAssetDict():Dictionary{
            var _local1:Dictionary = new Dictionary();
            _local1["dialog_bg"] = new m_comObject.drip_bg();
            m_assetBG = _local1["dialog_bg"];
            _local1["check_mark"] = m_comObject.drip_iconGreenCheck;
            _local1["cell_bg"] = m_comObject.drip_buttonBlue;
            _local1["cell_bg_ready"] = m_comObject.drip_buttonGreen;
            _local1["itemIcon"] = [];
            _local1["itemIcon"][0] = m_comObject.drip_iconCrew;
            _local1["itemIcon"][1] = m_comObject.drip_iconEnergy;
            _local1["itemIcon"][2] = m_comObject.drip_iconMystery;
            _local1["itemLabel"] = [];
            _local1["itemLabel"][0] = ZLoc.t("Dialogs", "DailyDripCrew");
            _local1["itemLabel"][1] = ZLoc.t("Dialogs", "DailyDripEnergy");
            _local1["itemLabel"][2] = ZLoc.t("Dialogs", "DailyDripMystery");
            _local1["rewardType"] = [];
            _local1["rewardType"][0] = "building";
            _local1["rewardType"][1] = "energy";
            _local1["rewardType"][2] = "mystery";
            return (_local1);
        }
        override protected function createDialogView(_arg1:Dictionary):GenericDialogView{
            var _local2:String = ZLoc.t("Dialogs", "DailyDripSubtitle");
            var _local3:GenericDialogView = new DailyDripDialogView(_arg1, m_message, m_dialogTitle, _local2, m_callback, m_SkipCallback);
            return (_local3);
        }

    }
}//package Display.DialogUI 
